﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using CE.Global;

public partial class Provider_ViewProviderWorkShop : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session[CE.Global.General.UserId] != null && Session[CE.Global.General.UserTypeId] != null)
        {
            if (Convert.ToInt32(Session[CE.Global.General.UserTypeId]) !=
                Convert.ToInt32(CE.Global.CEUserType.Provider))
            {
                Response.Redirect("ProviderSecureLogin.aspx");
            }
        }
        else
        {
            Response.Redirect("ProviderSecureLogin.aspx");
        }

        if (!Page.IsPostBack)
        {
            //DataTable _dtCompany = General.GetComboItem("ProviderCompany", false);
            //ddlProviderCompanyName.DataSource = _dtCompany;
            //ddlProviderCompanyName.DataTextField = _dtCompany.Columns[0].ColumnName.ToString();
            //ddlProviderCompanyName.DataValueField = _dtCompany.Columns[1].ColumnName.ToString();
            //ddlProviderCompanyName.DataBind();

            //ddlProviderCompanyName.Items.Insert(0, new ListItem("Select", "-1"));
        }
    }
    protected void FormView1_DataBound(object sender, EventArgs e)
    {

    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (GridView1.Rows.Count > 0)
        {
            Response.Redirect("AddNewProviderWorkShop.aspx?WSId=" + GridView1.SelectedDataKey.Value.ToString());
        }
    }
}
